Update remarks on name prefixes in coding conventions
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 12 Apr 2025 03:05:45 +0000 (11:05 +0800)
committerSean Whitton <spwhitton@spwhitton.name>
Sat, 12 Apr 2025 03:05:45 +0000 (11:05 +0800)
* doc/lispref/tips.texi (Coding Conventions): Say that it's okay
to put the name prefix later for defining constructs, rather
than explicitly instructing the reader to do so.  Condense the
recommendation to err on the side of prepending the name prefix.

doc/lispref/tips.texi

index 7eba1c8f388fb187ac50314a6717be7fb858d7b1..f0238276501306df1e4775cd307f465846584f0c 100644 (file)
@@ -73,18 +73,13 @@ not meant to be used by other packages.
 Occasionally, for a command name intended for users to use, it is more
 convenient if some words come before the package's name prefix.  For
 example, it is our convention to have commands that list objects named
-as @samp{list-@var{something}}, e.g., a package called @samp{frob}
-could have a command @samp{list-frobs}, when its other global symbols
-begin with @samp{frob-}.  Also, constructs that define functions,
-variables, etc., work better if they start with @samp{define-}, so put
-the name prefix later on in the name.
-
-This recommendation applies even to names for traditional Lisp
-primitives that are not primitives in Emacs Lisp---such as
-@code{copy-list}.  Believe it or not, there is more than one plausible
-way to define @code{copy-list}.  Play it safe; append your name prefix
-to produce a name like @code{foo-copy-list} or @code{mylib-copy-list}
-instead.
+as @samp{list-@var{something}}, e.g., a package called @samp{frob} could
+have a command @samp{list-frobs}, when its other global symbols begin
+with @samp{frob-}.  Also, constructs that define functions, variables,
+etc., may work better if they start with @samp{define-}, so it's okay to
+put the name prefix later on in the name.  Outside of these
+well-established cases, however, err on the side of prepending your name
+prefix.
 
 If you write a function that you think ought to be added to Emacs under
 a certain name, such as @code{twiddle-files}, don't call it by that name